<?php include 'init.php';?>
<?php 	
	$jbanner = get_config('banner');
	$banner = json_decode($jbanner,true);
	$cates = getCateByPid(0);

	$sql="SELECT * FROM setting";
	$temp=$mysql->getAll($sql);
	$r=array();
	foreach ($temp as $key => $value) {
		$r[$value['settingkey']]=$value['settingvalue'];
	}
	// print_r($r);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo get_config('title');?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Rock Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template, 
	SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, Sony Ericsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Custom Theme files -->
<link href="public/css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="public/css/style.css" type="text/css" rel="stylesheet" media="all">  
<!-- //Custom Theme files -->
<!-- font-awesome icons -->
<link href="public/css/font-awesome.css" rel="stylesheet"> 
<!-- //font-awesome icons -->
<!-- js -->
<script src="public/js/jquery-2.2.3.min.js"></script> 
<!-- //js -->
<!-- web-fonts --> 
<!-- <link href="//fonts.googleapis.com/css?family=Aladin" rel="stylesheet"> -->
<!-- <link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,300,300italic,400italic,700,700italic' rel='stylesheet' type='text/css'> -->
<!-- //web-fonts --> 
<!-- start-smooth-scrolling -->
<script type="text/javascript" src="public/js/move-top.js"></script>
<script type="text/javascript" src="public/js/easing.js"></script>	
<script type="text/javascript">
		jQuery(document).ready(function($) {
			$(".scroll").click(function(event){		
				event.preventDefault();
				$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
			});
		});
</script>
<!-- //end-smooth-scrolling -->
</head>
<body>
	<!-- banner start here -->
	<div class="agileinfo-main about-top">
		<div class="slider">
			<script src="public/js/responsiveslides.min.js"></script>
			<script>
				// You can also use "$(window).load(function() {"
				$(function () {
				  // Slideshow 1
				  $("#slider1").responsiveSlides({
					 auto: true,
					 nav: true,
					 speed: 500,
					 namespace: "callbacks",
				  });
				});
			</script>
			<ul class="rslides" id="slider1" style="height: 300px;">
				<li>
					<div class="banner" style="background: url('public/upload/<?php echo $banner[0]['banner'];?>')no-repeat center;">
						<h3>把醉了的明天寄托在潘多拉的琴弦、浮沉余生虚伪地歌咏天上人间。 </h3>
					</div>
				</li>
				<li>
					<div class="banner banner2" style="background: url('public/upload/<?php echo $banner[1]['banner'];?>')no-repeat center;">
						<h3>话说天下大势，分久必和，合久必分。 </h3>
					</div>
				</li>
				<li>
					<div class="banner banner3" style="background: url('public/upload/<?php echo $banner[2]['banner'];?>')no-repeat center 0px;">
						<h3>相思只在梦魂中。今宵月，偏照小楼东。 </h3>
					</div>
				</li>
			</ul>
		</div>
		<div class="agileinfo-header">
			<div class="container">
				<div class="agile-logo">
					<h1><a href="index.html"><i class="fa bounce bounceIn animated" aria-hidden="true"><img src="public/upload/<?php echo get_config('sitelogo');?>" style="width: 60px;height: 60px;"><br></i> <a style="font-size: 30px;font-weight: bolder;color: #fff;">风散了墨香</a>
					<!-- Rock -->
					</a></h1>
				</div>
				<div class="agileits-w3layouts-icons">
					<div class="social-icon">
						<!-- <a href="#" class="social-button qq" title=""QQ登录><i class="fa fa-qq">QQ</i></a>
						<a href="#" class="social-button weibo"><i class="fa fa-weibo" ></i></a> 
						<a href="#" class="social-button weixin"><i class="fa fa-comments" aria-hidden="true"></i></a> -->
						<!-- <a href="#" class="social-button register"><i class="fa ">注册</i></a> -->
						<a href="admin/login.php" class="social-button sign-in" title="管理员登录" alt="管理员登录"><i class="fa fa-user fa-fw"></i></a>
					</div> 
				</div>
				<div class="clearfix"> </div>
			</div>	    
		</div>
		<!-- navigation start here -->
		<div class="top-nav">
			<span class="menu">Menu</span>	
			<ul class="w3l">
				<li><a href="index.php"><i aria-hidden="true" class="glyphicon glyphicon-home"></i><span>主页</span></a></li>
				
				<li><a href="blog.php"><i class="glyphicon glyphicon-list-alt"></i><span>博文排列</span></a></li>
				<li><a href="codes.php"><i class="glyphicon glyphicon-picture"></i><span>博图排列</span></a></li>
				<li><a href="about.php"><i class="glyphicon glyphicon-user"></i><span>关于</span></a></li>
				<li><a class="active" href="contact.php"><i class="glyphicon glyphicon-envelope"></i><span>联系</span></a></li>
			</ul>
			<!-- script-for-menu -->
			<script>
			   $( "span.menu" ).click(function() {
				 $( "ul.w3l" ).slideToggle( 300, function() {
				 // Animation complete.
				  });
				 });
			</script>
			<!-- //script-for-menu -->
		</div>	
	</div>
	<!-- //navigation end here -->
	<!-- contact -->
	<div class="contact">
		<div class="container">  
			<h2 class="agile-title">联系我们</h2>
			<div class="col-md-7 contact-right">				
				<form action="contactadd.php" method="post"> 
					<input type="text" name="contact_name" placeholder="姓名" required="">
					<input type="email" name="contact_email" placeholder="邮箱" required=""> 
					<input type="text" name="contact_telephone" placeholder="联系方式" required="">
					<textarea name="contact_message" placeholder="请留下您的意见和建议……" required=""></textarea>
					<input type="text" name="cap_word" >&nbsp;&nbsp;&nbsp;<a id="captachimg"><img src="captach.php" ></a><br>
					<button class="btn btn-lg btn-success contact_send" >发送留言</button>
				</form>
			</div>
			<div class="col-md-5 contact-left">
				<p>"留下您的姓名，留下您的邮箱，发出您最珍贵的感觉，这是最美的味道！您会得到最没的回忆，会拥有最完美的体验！ "</p>
				<ul>
					<li><span class="glyphicon glyphicon-map-marker" aria-hidden="true"></span>
						<?php echo $r['address']; ?>
					</li>					
					<li><span class="glyphicon glyphicon-earphone" aria-hidden="true"></span>
						<?php echo $r['weichat']; ?>
					</li>
					<li><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
						<a href="mailto:example@mail.com"><?php echo $r['siteqq']; ?>@qq.com</a>
					</li>
				</ul>
			</div>						
			<div class="clearfix"> </div> 
			<div class="map">
				<h3 class="agile-title">
					<!-- How to Find Us -->
				</h3>
				<!-- <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d4376542.827441857!2d133.94238155277205!3d-25.73870281693212!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x2b2bfd076787c5df%3A0x538267a1955b1352!2sAustralia!5e0!3m2!1sen!2sin!4v1439377130002" allowfullscreen></iframe> -->
				<div class="map_baidu">
					<?php include 'map.php'; ?>
				</div>
				
			</div> 
		</div>			
	</div>
	<!-- //contact --> 
	<!-- 刷新验证码 -->
	<script type="text/javascript">
		$('#captachimg').on('click',function(){
			$('#captachimg').html('<img src="captach.php">');
		});
	</script>
	<!-- footer start here -->
	<?php include "footer.php"; ?>
	<!-- //copy right end here -->  
	<!-- smooth-scrolling-of-move-up -->
	<script type="text/javascript">
		$(document).ready(function() {
			/*
			var defaults = {
				containerID: 'toTop', // fading element id
				containerHoverID: 'toTopHover', // fading element hover id
				scrollSpeed: 1200,
				easingType: 'linear' 
			};
			*/
			
			$().UItoTop({ easingType: 'easeOutQuart' });
			
		});
	</script> 
	<!-- //smooth-scrolling-of-move-up -->
	<!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="public/js/bootstrap.js"></script>
</body>
</html>